package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the "POSITION" database table.
 * 
 */
@Entity
@Table(name="\"POSITION\"")
@NamedQuery(name="Position.findAll", query="SELECT p FROM Position p")
public class Position implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="POSITION_POSITIONID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="POSITION_POSITIONID_GENERATOR")
	@Column(name="POSITION_ID")
	private long positionId;

	@Column(name="ORGANIZATION_LEADERSHIP")
	private BigDecimal organizationLeadership;

	@Column(name="POSITION_BASS_SALARY")
	private BigDecimal positionBassSalary;

	@Column(name="POSITION_DINGYUAN")
	private BigDecimal positionDingyuan;

	@Column(name="POSITION_NAME")
	private String positionName;

	@Column(name="POSITION_PERSON")
	private String positionPerson;

	@Column(name="POSITION_REMARK")
	private String positionRemark;

	@Column(name="POSITION_STATE")
	private BigDecimal positionState;

	@Column(name="POSITION_UPDATEDATE")
	private Timestamp positionUpdatedate;

	@Column(name="POSITON_CREATORDATE")
	private Timestamp positonCreatordate;

	//bi-directional many-to-one association to Jobseekersregister
	@OneToMany(mappedBy="position")
	@JSONField(serialize=false)
	private List<Jobseekersregister> jobseekersregisters;

	//bi-directional many-to-one association to Organization
	@ManyToOne
	@JoinColumn(name="ORGANI_ID")
	private Organization organization;

	//bi-directional many-to-one association to Recruitapply
	@OneToMany(mappedBy="position")
	@JSONField(serialize=false)
	private List<Recruitapply> recruitapplies;

	//bi-directional many-to-one association to RecruitAdministration
	@OneToMany(mappedBy="position")
	@JSONField(serialize=false)
	private List<RecruitAdministration> recruitAdministrations;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="position")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	//bi-directional many-to-one association to Worksheet
	@OneToMany(mappedBy="position")
	@JSONField(serialize=false)
	private List<Worksheet> worksheets;

	public Position() {
	}

	public long getPositionId() {
		return this.positionId;
	}

	public void setPositionId(long positionId) {
		this.positionId = positionId;
	}

	public BigDecimal getOrganizationLeadership() {
		return this.organizationLeadership;
	}

	public void setOrganizationLeadership(BigDecimal organizationLeadership) {
		this.organizationLeadership = organizationLeadership;
	}

	public BigDecimal getPositionBassSalary() {
		return this.positionBassSalary;
	}

	public void setPositionBassSalary(BigDecimal positionBassSalary) {
		this.positionBassSalary = positionBassSalary;
	}

	public BigDecimal getPositionDingyuan() {
		return this.positionDingyuan;
	}

	public void setPositionDingyuan(BigDecimal positionDingyuan) {
		this.positionDingyuan = positionDingyuan;
	}

	public String getPositionName() {
		return this.positionName;
	}

	public void setPositionName(String positionName) {
		this.positionName = positionName;
	}

	public String getPositionPerson() {
		return this.positionPerson;
	}

	public void setPositionPerson(String positionPerson) {
		this.positionPerson = positionPerson;
	}

	public String getPositionRemark() {
		return this.positionRemark;
	}

	public void setPositionRemark(String positionRemark) {
		this.positionRemark = positionRemark;
	}

	public BigDecimal getPositionState() {
		return this.positionState;
	}

	public void setPositionState(BigDecimal positionState) {
		this.positionState = positionState;
	}

	public Timestamp getPositionUpdatedate() {
		return this.positionUpdatedate;
	}

	public void setPositionUpdatedate(Timestamp positionUpdatedate) {
		this.positionUpdatedate = positionUpdatedate;
	}

	public Timestamp getPositonCreatordate() {
		return this.positonCreatordate;
	}

	public void setPositonCreatordate(Timestamp positonCreatordate) {
		this.positonCreatordate = positonCreatordate;
	}

	public List<Jobseekersregister> getJobseekersregisters() {
		return this.jobseekersregisters;
	}

	public void setJobseekersregisters(List<Jobseekersregister> jobseekersregisters) {
		this.jobseekersregisters = jobseekersregisters;
	}

	public Jobseekersregister addJobseekersregister(Jobseekersregister jobseekersregister) {
		getJobseekersregisters().add(jobseekersregister);
		jobseekersregister.setPosition(this);

		return jobseekersregister;
	}

	public Jobseekersregister removeJobseekersregister(Jobseekersregister jobseekersregister) {
		getJobseekersregisters().remove(jobseekersregister);
		jobseekersregister.setPosition(null);

		return jobseekersregister;
	}

	public Organization getOrganization() {
		return this.organization;
	}

	public void setOrganization(Organization organization) {
		this.organization = organization;
	}

	public List<Recruitapply> getRecruitapplies() {
		return this.recruitapplies;
	}

	public void setRecruitapplies(List<Recruitapply> recruitapplies) {
		this.recruitapplies = recruitapplies;
	}

	public Recruitapply addRecruitapply(Recruitapply recruitapply) {
		getRecruitapplies().add(recruitapply);
		recruitapply.setPosition(this);

		return recruitapply;
	}

	public Recruitapply removeRecruitapply(Recruitapply recruitapply) {
		getRecruitapplies().remove(recruitapply);
		recruitapply.setPosition(null);

		return recruitapply;
	}

	public List<RecruitAdministration> getRecruitAdministrations() {
		return this.recruitAdministrations;
	}

	public void setRecruitAdministrations(List<RecruitAdministration> recruitAdministrations) {
		this.recruitAdministrations = recruitAdministrations;
	}

	public RecruitAdministration addRecruitAdministration(RecruitAdministration recruitAdministration) {
		getRecruitAdministrations().add(recruitAdministration);
		recruitAdministration.setPosition(this);

		return recruitAdministration;
	}

	public RecruitAdministration removeRecruitAdministration(RecruitAdministration recruitAdministration) {
		getRecruitAdministrations().remove(recruitAdministration);
		recruitAdministration.setPosition(null);

		return recruitAdministration;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setPosition(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setPosition(null);

		return staffInformation;
	}

	public List<Worksheet> getWorksheets() {
		return this.worksheets;
	}

	public void setWorksheets(List<Worksheet> worksheets) {
		this.worksheets = worksheets;
	}

	public Worksheet addWorksheet(Worksheet worksheet) {
		getWorksheets().add(worksheet);
		worksheet.setPosition(this);

		return worksheet;
	}

	public Worksheet removeWorksheet(Worksheet worksheet) {
		getWorksheets().remove(worksheet);
		worksheet.setPosition(null);

		return worksheet;
	}

}